package cn.gson.fengboot.controller;

import cn.gson.fengboot.model.pojos.QdepFrom;
import cn.gson.fengboot.model.pojos.QempFrom;
import cn.gson.fengboot.model.pojos.QroleFromBo;
import cn.gson.fengboot.model.routervo.MypwdVo;
import cn.gson.fengboot.model.service.DdepService;
import cn.gson.fengboot.model.service.DempService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;


@RestController
@RequestMapping("/myemp")
public class DempController {

    @Autowired
    DempService service;

    /*模糊查询员工*/
    @RequestMapping("/selectmyemp")
    public List<QempFrom> selectmyemp(Integer roleId,Integer empId,
                                      String myempnameinput,Boolean myempservice,
                                      Boolean myempstatu){
        return service.selectmyemp(roleId,empId,myempnameinput,myempservice,myempstatu);
    }

    /*验证员工姓名是否注册过*/
    /*根据姓名查询员工信息*/
    @RequestMapping("/selectBymyempId")
    public QempFrom selectBymyempId(Integer empId){
        return service.selectBymyempId(empId);
    }
    /*新增员工*/
    @RequestMapping("/addmyempfrom")
    public String addmyempfrom(String empfrom){
        return service.addmyempfrom(empfrom);
    }

    /*修改密码验证*/
    @RequestMapping("/verifymypwd")
    public String verifymypwd(@RequestBody MypwdVo mypwdVo){
        return service.verifymypwd(mypwdVo);
    }
}
